﻿using System;

namespace Annotations
{
    /// <summary>
    /// Describes the length of a data type
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class PrecisionAttribute : Attribute
    {
        public PrecisionAttribute(int precision)
        {
            Value = precision;
        }

        #region Properties

        /// <summary>
        /// The length of the integer part of the number or the length of a string in digits (scale plus precision)
        /// </summary>
        public int Value { get; private set; }

        #endregion
    }
}
